package com.sicheng.metadata.juc.线程通信.synchronize;
@SuppressWarnings("all")
public class ShareApp {
    public static void main(String[] args) {
        Share share = new Share();
        new Thread(()->{
            for (int i = 0; i < 10; i++) {
               share.decr();
            }
        }, "AA").start();
        new Thread(()->{
            for (int i = 0; i < 10; i++) {
                share.incr();
            }
        }, "BB").start();
    }

}
